package com.example.javaee_library.Service;

import com.example.javaee_library.Entity.Appointment;
import com.example.javaee_library.Entity.Book;
import com.example.javaee_library.Entity.User;
import com.example.javaee_library.dto.JsonData;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author Miao-yongzheng
 * @create 2021-12-20 20:50
 */
public interface User_Service {
    /*/**
    * @Description: 登录
    * @Param:
    * @return:
    * @Author: Miao
    * @Date: 2021/12/20
    */
    User Login(String Username, String Password);
    /*/**
    * @Description: 查图书
    * @Param:
    * @return:
    * @Author: Miao
    * @Date: 2021/12/21
    */
    List<Appointment> myAppoint(String UserId);

    /*/**
     * @Description: 模糊查询人员
     * @Param:
     * @return:
     * @Author: Miao
     * @Date: 2021/12/21
     */
    List<User> Serach(String UserId);

    /*/**
    * @Description: 插入人员
    * @Param:
    * @return:
    * @Author: Miao
    * @Date: 2021/12/22
    */
    boolean InsertUser(int UserId,String password,String autority);

    /*/**
    * @Description: 员工自己修改自己
    * @Param:
    * @return:
    * @Author: Miao
    * @Date: 2022/1/4
    */
    public boolean UpdateByUser(int UserId,String password);

    /*/**
    * @Description: 管理员修改用户
    * @Param:
    * @return:
    * @Author: Miao
    * @Date: 2022/1/4
    */
    public boolean UpdateByAdmin(int oldId,String password,String authority,int state,int deleted);

    /*/**
    * @Description: 冻结
    * @Param:
    * @return:
    * @Author: Miao
    * @Date: 2022/1/4
    */
    public boolean freeze (int id);

    /*/**
    * @Description: 解冻
    * @Param:
    * @return:
    * @Author: Miao
    * @Date: 2022/1/4
    */
    public boolean unfreeze (int id);

}
